package collection;

import java.util.Collections;
import java.util.LinkedList;

/**
 * @Description: null
 * @Project: testDemo
 * @Author: hjibo
 * @CreateDate: 2019-02-17 17:27
 * @ModificationHistory:
 */
public class Main {

    public static void main(String[] args) {
//        HashMap map;
//        ConcurrentHashMap map1;
//        CopyOnWriteArrayList list;
//        CopyOnWriteArraySet set;

        LinkedList<Integer> linkedList = new LinkedList<>();
        linkedList.add(1);
        linkedList.add(4);
        linkedList.add(7);
        linkedList.add(2);
        linkedList.add(3);
        linkedList.add(9);
        linkedList.add(8);

        linkedList.forEach(integer -> {
            System.out.println(integer);
        });

        // 排序
        Collections.sort(linkedList);
        linkedList.forEach(integer -> {
            System.out.println(integer);
        });

    }
}
